package com.nyist.zk.dao;

import com.nyist.zk.entities.Patient;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PatientDao {

    Patient getPatientByIdAndPassword(@Param("p_id")Integer p_id, @Param("p_password")String p_password);

    List<Patient> findAllPatient();

    List<Patient> adminFindPatientByNameLike(String p_name);

    List<Patient> doctorFindPatientByNameLike(@Param("p_doctor")Integer p_doctor,@Param("p_name")String p_name);

    Patient findByIdPatient(Integer p_id);

    void insertPatient(Patient patient);

    void deleteByIdPatient(Integer p_id);

    void updatePatient(Patient patient);

    List<Patient> doctorFindAllPatient(Integer p_doctor);

}
